/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package neuronalenetzeelearning.view.help;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import atp.cHotEqn;

/**
 *
 * @author maria
 */
public class HelpWindowFactory extends cHotEqn {

    public static void createHelpWindow(HelpPanel helpPanel) {
        final JFrame helpWindow = new JFrame();
        JPanel mainPanel = new JPanel(new BorderLayout(10,10));

//        helpWindow.setPreferredSize(new Dimension(800, 800));
        helpWindow.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
        JButton exitButton = new JButton("Hilfe schließen");
        exitButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                helpWindow.dispose();

            }
        });
        mainPanel.setBackground(Color.WHITE);
        helpPanel.setBackground(Color.WHITE);
        helpWindow.setBackground(Color.WHITE);
        
        mainPanel.add(helpPanel,BorderLayout.CENTER);
        mainPanel.add(exitButton,BorderLayout.SOUTH);
        helpWindow.getContentPane().add(mainPanel);
        
        helpWindow.pack();
        helpWindow.setVisible(true);
    }
}
